/**
 * 
 */
package org.unisannio.server;

/**
 * @author sistemiembedded2011
 *
 */
public class CleanUp extends Thread {
	
	private CustomServer server;
	private int minutes;
	
	public CleanUp(CustomServer server,int minutes) {
		this.setPriority(MIN_PRIORITY);
		this.server=server;
		this.minutes=minutes;
	}
	
	@Override
	public void run() {
		super.run();
		
		while(true){
			server.checkRecheability();
			try {
				Thread.sleep(1000*60*minutes); //millis*seconds*minutes
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}
